package erwiki.ui.app.parts.navigation;

import org.eclipse.jface.viewers.LabelProvider;
import org.elwiki_data.WikiPage;

public class NavLabelProvider extends LabelProvider {

	private static final long serialVersionUID = -8901972726377748461L;

	@Override
	public String getText(Object element) {
		String result = null;
		if (element instanceof WikiPage wikiPage) {
			result = wikiPage.getName();
		} else if (element != null) {
			result = element.toString();
		}
		return result;
	}

}
